import 'package:flutter/material.dart';
import 'package:flutter_template/generated/i18n.dart';

class AboutPage extends StatefulWidget {
  AboutPage({Key key}) : super(key: key);
  @override
  _AboutState createState() => _AboutState();
}

class _AboutState extends State<AboutPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text(I18n.of(context).about)),
      body: ListView(
        children: <Widget>[
		  Container(
		    height: 160.0,
            alignment: Alignment.center,
			decoration: BoxDecoration(
			  color: Colors.white,
			  //border: Border.all(width: 0.33, color: Colors.red)
			),
			child: Column(
			  mainAxisAlignment: MainAxisAlignment.center,
              mainAxisSize: MainAxisSize.min,
              children: <Widget>[
                Card(
                  color: Theme.of(context).primaryColor,
                  elevation: 0.0,
                  shape: RoundedRectangleBorder(
                  borderRadius: BorderRadius.all(Radius.circular(6.0))),
				  child: Image.asset(
                    "assets/images/logo.png",
                    width: 72.0,
                    fit: BoxFit.fill,
                    height: 72.0,
				  )
				),
				Text(
                  "2.0",
                  //style: TextStyle(color: Colors.red, fontSize: 14.0),
                )
			  ]
			)
		  ),
		  ListTile(
            title: Text(I18n.of(context).appName),
			trailing: Icon(Icons.navigate_next,color: Colors.grey),
			onTap: () {
			  //launch('https://github.com/xuexiangjys');
			}
          ),
		  ListTile(
            title: Text(I18n.of(context).update),
			trailing: Row(
			  mainAxisSize: MainAxisSize.min,
              children: <Widget>[
			    Text(
				  I18n.of(context).latest,
				  style: TextStyle(color:Colors.grey,fontSize: 14.0)
				),
				Icon(
                  Icons.navigate_next,
                  color: Colors.grey,
                )
			  ]
			),
			onTap: () {
			  //XUpdate.initAndCheck();
			}
          ),
        ]
      )
    );
  }
}
